﻿#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include "login.h"
#include "reader.h"
#include "readersql.h"
#include "register.h"
#include"book_sql.h"
#include"all_book.h"
#include"borrow_book.h"
#include"global.h"
#include"single_book_add.h"
#include"emailwindow.h"
#include"information.h"
#include<QMouseEvent>
#include<QCursor>
#include<QScreen>
QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow(QWidget *parent = nullptr);
    ~MainWindow();
    Readersql* rsql;
    book_sql* bok;
    void mouseMoveEvent(QMouseEvent*event);
    void mousePressEvent(QMouseEvent*event);
    QPoint m_dragPos;


private slots:
     void on_btn_reader_clicked();

     void on_pushButton_3_clicked();

     void on_book_all_clicked();

     void on_btn_return_borrow_clicked();

     void on_book_add_sys_clicked();


     void on_minBtn_clicked();

private:
    Ui::MainWindow *ui;
    Login * m_login=nullptr;
    Reader * m_reader=nullptr;
    Register * m_register=nullptr;
    all_book *book=nullptr;
    Borrow_book *borrow=nullptr;
    single_book_add *bok_add=nullptr;
    EmailWIndow * email=nullptr;
    Information * privateCenter=nullptr;
signals:
    void restart();
};
#endif // MAINWINDOW_H
